using System.IO;

namespace ZFramework
{
    public interface ISerde
    {
        ISerde FromStream(Stream stream);
        T FromStream<T>(Stream stream) where T: ISerde => (T)FromStream(stream);
        
        void WriteToStream(Stream stream);
    }
}